﻿using GameStructure.Contracts;
using GameStructure.Core;
using GameStructure.Types;
using GameStructure.Utilities;
using Tao.OpenGl;

namespace GameStructure.GaneState
{
    public class TestWrappedTextState : IGameObject
    {
        readonly Text _longText;
        readonly Renderer _renderer = new Renderer();

        public TestWrappedTextState(TextureManager textureManager)
        {
            var font = new Font(textureManager.Get("font"), FontParser.Parse(@"Resources\font.fnt"));
            _longText = new Text("The quick brown fox jumps over the lazy dog", font, 400);
        }

        public void Render()
        {
            Gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
            Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
            _renderer.DrawText(_longText);
        }

        public void Update(double elapsedTime)
        {
        }
    }
}